#!/usr/bin/env bash
export ELECTRON_ENABLE_LOGGING=1
export ELECTRON_ENABLE_STACK_DUMPING=true
ulimit -s unlimited
if [ -z $DISPLAY ]; then
  (cd Browser && xvfb-run npx electron --js-flags="--stack-size 500000 --max_old_space_size=8192" . "${@:1}")
else
  (cd Browser && npx electron --js-flags="--stack-size 500000 --max_old_space_size=8192" . "${@:1}")
fi
